package ck.com.api;

import ck.com.dto.Dto;
import ck.com.pojo.DeliveryOrderDetail;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;
import java.util.Map;

public interface DeliveryOrderDetailApi {

    /***
     * 根据货验收单id查询详情
     * @param param 参数装了一个DeliveryOrderId
     * @return DeliveryOrderDetail 对象
     */
    @RequestMapping(value = "/listDeliveryOrderDById")
    Dto<Map<String, Object>> listDeliveryOrderDById(@RequestBody Map<String, Object> param);

    /***
     * 更新货验收单明细表的实收商品数量和残次品数量
     * @param deliveryOrderDetailList 参数装了一个DeliveryOrderId
     * @return 更新没有return参数
     */
    @RequestMapping("/updateDeliveryOrderDInspect")
    Dto updateDeliveryOrderDInspect(@RequestBody List<DeliveryOrderDetail> deliveryOrderDetailList);

    /***
     * 根据货验收单 deliveryOrder 合并 Consolidation 来to 生成入库单明细 WarehouseEntryReceipt Detail
     * @param deliveryOrderDetailList 参数装了一个DeliveryOrderId
     * @return 更新没有return参数
     */
    @RequestMapping("/DODConsolidationToWhERD")
    Dto<List<DeliveryOrderDetail>> DODConsolidationToWhERD(@RequestBody List<DeliveryOrderDetail> deliveryOrderDetailList);

    @RequestMapping("/addDeliveryDetail")
    Dto<Integer> addDeliveryDetail(@RequestBody List<DeliveryOrderDetail> list);
}
